import request from '@/utils/request'

// 查询检测单信息列表
export function listList(query) {
  return request({
    url: '/project_list/list/list',
    method: 'get',
    params: query
  })
}

// 查询检测单信息详细
export function getList(projectId) {
  return request({
    url: '/project_list/list/' + projectId,
    method: 'get'
  })
}

// 新增检测单信息
export function addList(data) {
  return request({
    url: '/project_list/list',
    method: 'post',
    data: data
  })
}

// 修改检测单信息
export function updateList(data) {
  return request({
    url: '/project_list/list',
    method: 'put',
    data: data
  })
}

// 删除检测单信息
export function delList(projectId) {
  return request({
    url: '/project_list/list/' + projectId,
    method: 'delete'
  })
}

// 审批受理 by projectId
export function approvalDetect(projectId) {
  return request({
    url: '/project_list/list/' + projectId,
    method: 'put'
  })
}

// 取消审批受理 by projectId
export function cancelApproval(projectId) {
  return request({
    url: '/project_list/list/' + projectId,
    method: 'post'
  })
}
